create table "public"."layout" (
    "id" bigint generated by default as identity not null,
    "created_at" timestamp with time zone default now(),
    "filters" jsonb,
    "columns" jsonb,
    "user_id" uuid not null,
    "name" text not null
);


alter table "public"."layout" enable row level security;

CREATE UNIQUE INDEX layouts_pkey ON public.layout USING btree (id);

alter table "public"."layout" add constraint "layouts_pkey" PRIMARY KEY using index "layouts_pkey";

alter table "public"."layout" add constraint "layout_user_id_fkey" FOREIGN KEY (user_id) REFERENCES auth.users(id) not valid;

alter table "public"."layout" validate constraint "layout_user_id_fkey";

create policy "Enable read access for all users"
on "public"."layout"
as permissive
for all
to public
using ((user_id = auth.uid()))
with check ((user_id = auth.uid()));



